/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class AquariumOxygenGenerator {
    static categoryCode = '010090021';

    static categoryName = '鱼缸制氧机';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return AquariumOxygenGenerator.categoryCode;
    }

    get categoryName() {
        return AquariumOxygenGenerator.categoryName;
    }

    getDuration(params) {
        return command({
            method: 'getDuration',
            methodId: 'pDrhrH0G',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getFlowRate(params) {
        return command({
            method: 'getFlowRate',
            methodId: 'pZgubjxS',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRemainTime(params) {
        return command({
            method: 'getRemainTime',
            methodId: 'pGox3yFV',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'p1vZLih3',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDuration(params) {
        return command({
            method: 'setDuration',
            methodId: 'pUPQDORL',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setFlowRate(params) {
        return command({
            method: 'setFlowRate',
            methodId: 'peH3eUPd',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'ppAr4fnZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default AquariumOxygenGenerator;
